<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		body{
			position: relative;
		}
		.w{
			width: 1600px;
			margin: 50px auto;
			border: 1px solid red;
		}
		img{
			/*width: 1900px;
			margin-left: -100px;*/
			width: 100%;
		}
		.nav_left{
			width: 100px;
			height: 100px;
			border: 1px solid blue;
			position: absolute;
			left: 0;
			top: 0;
		}
	</style>
</head>
<body>
	<div class="nav_left">
		
	</div>
	<div class="w">
		<div class="img">
			<img src="0.png" alt="">
		</div>
	</div>

	<script>
		
		var	h=document.documentElement.clientHeight||document.body.clientHeight;
		var	w=document.documentElement.clientWidth||document.body.clientWidth;
		console.log(h);
		console.log(w);
		var img = document.getElementsByTagName('img')[0];
		var img_w=img.width.value;
		img_w=w;
		console.log(img_w);

	</script>
</body>
</html>